Alibabacloud.com offers a wide variety of articles about mysql command to restore database from sql file, easily find your mysql command to restore database from sql file information here online.
Rotten mud: Restore the mysql database through binlog, binlogmysql
This article was sponsored by Xiuyi linfeng and first launched in the dark world.
In the previous article, we explained the basic knowledge about mysql binlog. In this article, we
In order to ensure data security, the data needs to be backed up regularly. There are a number of ways to backup, and the effect is different. Once there is an error in the data in the database, you need to use the backed-up data for restore
On the MySQL database backup and restore method, here is the first to refer to the Backup tool: Mysqlhotcopy, using the Mysqlhotcopy tool for quick backup, then data restore, using the MySQL command restore, and finally need to export the database
You can use the MySQL command line to back up and restore the database. The following describes how to use the MySQL command line to implement this function for your reference.
You can use the MySQL command line to back up and restore the database.
"Backing up single database-Multiple parameters" syntax: Mysqldump-u username-P database name > backup file name"View the character set of a database"Mysql> Show variables like ' character_set% '; +--------------------------+-------------------------
Mysql binary log file Restore database, mysql binary log file
Roles of binary log files
The mysql binary log file is used to record all user operations on the database, that is, the SQL statements that the user operates on the database. If this file
Restore a database: mysql-h localhost-u root-p123456 wwwBacking up a database: mysqldump-h localhost-u root-p123456 www > d:\www2008-2-26.sqlWhere www is the database nameThe following is a test in the program$command = "Mysqldump–opt-h $dbhost-u
The mysqldump command is a very good database operation command in mysql. It can back up and restore the database, and is used in almost all database command backups, next I will introduce some usage of mysqldump.
I. Common Operations:
Back up the
MYSQL command line Import and Export Database details, mysql command line Import and Export
Mysql command line import database:
1. The. SQL file to be imported is moved to the binfile, which is convenient.2. Step 1 of the above-mentioned export3.
1. Various usage instructionsA. The simplest usage:[database name[dump file] The above command backs up the specified database to a dump file (dump file), such as:> Test. DumpThe generated Test.dump file contains the Build Table statement (the
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.